package com.verysimple.skins
{
	import mx.skins.RectangularBorder;
    import flash.display.Graphics;
    import mx.graphics.RectangularDropShadow;

	public class RoundedCornersBL extends RectangularBorder
    {

        private var dropShadow:RectangularDropShadow;

        override protected function updateDisplayList (unscaledWidth:Number, unscaledHeight:Number):void 
        {

            super.updateDisplayList(unscaledWidth, unscaledHeight);
            var cornerRadius:Number = getStyle("cornerRadius");
            var backgroundColor:int = getStyle("backgroundColor");
            var backgroundAlpha:Number = getStyle("backgroundAlpha");
            
            // for whatever reason corner radius need to be doubled for consistency with normal styles
			cornerRadius = cornerRadius * 2;

            graphics.clear();
            
            // draw the background
            drawRoundRect
            (
                0, 0, unscaledWidth, unscaledHeight, 
                {tl: 0, tr: 0, bl: cornerRadius, br: 0}, 
                backgroundColor, backgroundAlpha
            );
            

        }
	}
}